package com.oocl.heather.main;

import java.io.File;
import java.util.Scanner;

import com.oocl.heather.cmd.impl.CatCommand;
import com.oocl.heather.cmd.impl.CdCommand;
import com.oocl.heather.cmd.impl.CpCommand;
import com.oocl.heather.cmd.impl.LsCommand;
import com.oocl.heather.cmd.impl.MkdirCommand;
import com.oocl.heather.cmd.impl.PwdCommand;
import com.oocl.heather.cmd.impl.RmCommand;
import com.oocl.heather.cmd.impl.TouchCommand;
import com.oocl.heather.util.Command;
import com.oocl.heather.util.CurrentFile;

/**
 * Hello world!
 *
 */
public class App 
{
	public void init(){
		System.out.println("--------------------------------------------------------------------------------------");
		System.out.println();
		System.out.println("                  welcome to the system");
		System.out.println();
		System.out.println("--------------------------------------------------------------------------------------");
		new LsCommand().execute();
		new PwdCommand().execute();
		new MkdirCommand().execute();
		new TouchCommand().execute();
		new CpCommand().execute();
		new CatCommand().execute();
		new RmCommand().execute();
		new CdCommand().execute();
		System.out.println("--------------------------------------------------------------------------------------");
		System.out.println();		
	}
	public void start(){
		@SuppressWarnings("resource")
		Scanner in=new Scanner(System.in);
		
		String str;
		
		Command command=new Command();
		
		do{
			System.out.print("Please input your command:");
			str=in.nextLine();
			File curren=new CurrentFile().currenfile();
			String result=command.getCommands(str,curren);
		}while(true);
	}
}
